package BaseObject.homework;

import java.util.Arrays;
import java.util.stream.DoubleStream;

/**
 * @author Raymond
 * @create 2025/3/13 10:07
 */
public class Homework01 {
    public static void main(String[] args) {
        double[] arr = {0.2, 0.5, 0.3, 0.6};
        A01 a01 = new A01();
        System.out.println("a01.maxDouble(arr) = " + a01.maxDouble(arr));
    }
}

class A01 {
    public double maxDouble(double[] arr) {
        double max = arr[0];
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] > max) {
                max = arr[i];
            }
        }
        return max;
    }
}
